package com.qunar.toku.proxy;

import org.jboss.netty.channel.Channel;



/**
 * server消息提供者
 * 
 * @author zhangwan
 * 
 */
public class Provider {
	private final Channel channel;
	private final RequestProtocol protocol;

	public Provider(Channel channel, RequestProtocol protocol) {
		this.channel = channel;
		this.protocol = protocol;
	}

	public void send(Object message) {
		protocol.setMessage(message);
		channel.write(protocol); //对客户端的请求进行处理后, 将此token与处理结果一起发回给客户端
	}
	
}
